
class OpenWalletInfoModel {
  String? plat;
  String? channel;
  SubjectInfo? subjectInfo;
  LegalPersonInfo? legalPersonInfo;
  BankAccount? bankAccount;
  BusinessAddressInfo? businessAddressInfo;

  OpenWalletInfoModel({this.plat, this.channel, this.subjectInfo, this.legalPersonInfo, this.bankAccount, this.businessAddressInfo});

  OpenWalletInfoModel.fromJson(Map<String, dynamic> json) {
    plat = json["plat"];
    channel = json["channel"];
    subjectInfo = json["subjectInfo"] == null ? null : SubjectInfo.fromJson(json["subjectInfo"]);
    legalPersonInfo = json["legalPersonInfo"] == null ? null : LegalPersonInfo.fromJson(json["legalPersonInfo"]);
    bankAccount = json["bankAccount"] == null ? null : BankAccount.fromJson(json["bankAccount"]);
    businessAddressInfo = json["businessAddressInfo"] == null ? null : BusinessAddressInfo.fromJson(json["businessAddressInfo"]);
  }

  static List<OpenWalletInfoModel> fromList(List<Map<String, dynamic>> list) {
    return list.map(OpenWalletInfoModel.fromJson).toList();
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> _data = <String, dynamic>{};
    _data["plat"] = plat;
    _data["channel"] = channel;
    if(subjectInfo != null) {
      _data["subjectInfo"] = subjectInfo?.toJson();
    }
    if(legalPersonInfo != null) {
      _data["legalPersonInfo"] = legalPersonInfo?.toJson();
    }
    if(bankAccount != null) {
      _data["bankAccount"] = bankAccount?.toJson();
    }
    if(businessAddressInfo != null) {
      _data["businessAddressInfo"] = businessAddressInfo?.toJson();
    }
    return _data;
  }
}

class BusinessAddressInfo {
  String? address;
  String? province;
  String? city;
  String? district;

  BusinessAddressInfo({this.address, this.province, this.city, this.district});

  BusinessAddressInfo.fromJson(Map<String, dynamic> json) {
    address = json["address"];
    province = json["province"];
    city = json["city"];
    district = json["district"];
  }

  static List<BusinessAddressInfo> fromList(List<Map<String, dynamic>> list) {
    return list.map(BusinessAddressInfo.fromJson).toList();
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> _data = <String, dynamic>{};
    _data["address"] = address;
    _data["province"] = province;
    _data["city"] = city;
    _data["district"] = district;
    return _data;
  }
}

class BankAccount {
  String? accountType;
  String? cardNo;
  String? bankCode;
  String? bankName;
  String? province;
  String? city;
  String? branch;
  String? openingLicenseUrl;

  BankAccount({this.accountType, this.cardNo, this.bankCode, this.bankName, this.province, this.city, this.branch, this.openingLicenseUrl});

  BankAccount.fromJson(Map<String, dynamic> json) {
    accountType = json["accountType"];
    cardNo = json["cardNo"];
    bankCode = json["bankCode"];
    bankName = json["bankName"];
    province = json["province"];
    city = json["city"];
    branch = json["branch"];
    openingLicenseUrl = json["openingLicenseUrl"];
  }

  static List<BankAccount> fromList(List<Map<String, dynamic>> list) {
    return list.map(BankAccount.fromJson).toList();
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> _data = <String, dynamic>{};
    _data["accountType"] = accountType;
    _data["cardNo"] = cardNo;
    _data["bankCode"] = bankCode;
    _data["bankName"] = bankName;
    _data["province"] = province;
    _data["city"] = city;
    _data["branch"] = branch;
    _data["openingLicenseUrl"] = openingLicenseUrl;
    return _data;
  }
}

class LegalPersonInfo {
  String? legalPersonName;
  String? legalPersonLicenceNo;
  String? legalLicenceFrontUrl;
  String? legalLicenceBacktUrl;
  String? certValidityType;
  String? certBeginDate;
  String? certEndDate;
  String? legalPersonMobile;
  String? contactMobile;
  String? contactName;
  String? contactEmail;
  String? cardNoMobile;
  String? basicAccountLicenceNo;

  LegalPersonInfo({this.legalPersonName, this.legalPersonLicenceNo, this.legalLicenceFrontUrl, this.legalLicenceBacktUrl, this.certValidityType, this.certBeginDate, this.certEndDate, this.legalPersonMobile, this.contactMobile, this.contactName, this.contactEmail, this.cardNoMobile, this.basicAccountLicenceNo});

  LegalPersonInfo.fromJson(Map<String, dynamic> json) {
    legalPersonName = json["legalPersonName"];
    legalPersonLicenceNo = json["legalPersonLicenceNo"];
    legalLicenceFrontUrl = json["legalLicenceFrontUrl"];
    legalLicenceBacktUrl = json["legalLicenceBacktUrl"];
    certValidityType = json["certValidityType"];
    certBeginDate = json["certBeginDate"];
    certEndDate = json["certEndDate"];
    legalPersonMobile = json["legalPersonMobile"];
    contactMobile = json["contactMobile"];
    contactEmail = json["contactEmail"];
    contactName = json["contactName"];
    cardNoMobile = json["cardNoMobile"];
    basicAccountLicenceNo = json["basicAccountLicenceNo"];
  }

  static List<LegalPersonInfo> fromList(List<Map<String, dynamic>> list) {
    return list.map(LegalPersonInfo.fromJson).toList();
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> _data = <String, dynamic>{};
    _data["legalPersonName"] = legalPersonName;
    _data["legalPersonLicenceNo"] = legalPersonLicenceNo;
    _data["legalLicenceFrontUrl"] = legalLicenceFrontUrl;
    _data["legalLicenceBacktUrl"] = legalLicenceBacktUrl;
    _data["certValidityType"] = certValidityType;
    _data["certBeginDate"] = certBeginDate;
    _data["certEndDate"] = certEndDate;
    _data["legalPersonMobile"] = legalPersonMobile;
    _data["contactMobile"] = contactMobile;
    _data["contactName"] = contactName;
    _data["contactEmail"] = contactEmail;
    _data["cardNoMobile"] = cardNoMobile;
    _data["basicAccountLicenceNo"] = basicAccountLicenceNo;
    return _data;
  }
}

class SubjectInfo {
  String? certNo;
  String? certValidate;
  String? certValidityType;
  String? certBeginDate;
  String? certEndDate;
  String? certUrl;
  String? signName;
  String? cardNoMobile;
  String? basicAccountLicenceNo;
  String? contactMobile;
  String? contactName;
  String? contactEmail;


  SubjectInfo({this.certNo, this.certValidate, this.certValidityType, this.certBeginDate, this.certEndDate, this.certUrl, this.signName, this.contactMobile, this.contactName, this.contactEmail, this.cardNoMobile, this.basicAccountLicenceNo});

  SubjectInfo.fromJson(Map<String, dynamic> json) {
    certNo = json["certNo"];
    certValidate = json["certValidate"];
    certValidityType = json["certValidityType"];
    certBeginDate = json["certBeginDate"];
    certEndDate = json["certEndDate"];
    certUrl = json["certUrl"];
    signName = json["signName"];
    contactMobile = json["contactMobile"];
    contactName = json["contactName"];
    contactEmail = json["contactEmail"];
    cardNoMobile = json["cardNoMobile"];
    basicAccountLicenceNo = json["basicAccountLicenceNo"];
  }

  static List<SubjectInfo> fromList(List<Map<String, dynamic>> list) {
    return list.map(SubjectInfo.fromJson).toList();
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> _data = <String, dynamic>{};
    _data["certNo"] = certNo;
    _data["certValidate"] = certValidate;
    _data["certValidityType"] = certValidityType;
    _data["certBeginDate"] = certBeginDate;
    _data["certEndDate"] = certEndDate;
    _data["certUrl"] = certUrl;
    _data["signName"] = signName;
    _data["contactMobile"] = contactMobile;
    _data["contactName"] = contactName;
    _data["contactEmail"] = contactEmail;
    _data["cardNoMobile"] = cardNoMobile;
    _data["basicAccountLicenceNo"] = basicAccountLicenceNo;
    return _data;
  }
}